New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Clean up parser
comments
#15252
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/53653/ |
leadingNode: Node | null; | ||
trailingNode: Node | null; | ||
containingNode: Node | null; | ||
start: number; // the start of the whitespace token. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, but if we use jsdoc-like comments editors will show the as the description in autocompletion:
/**
* The start of the whitespace token.
*/
start: number;
even if probably comments for start/end/comments are not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* ↓↓↓ We had escaped "\/" to "\\/" for comments | ||
* For example, when parsing *\/ | ||
* // async /* 1 *\/ function f() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually prefer the old comment style, so that it didn't need escapes 😛
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you try if JLHwung@6eee6d0 works? I added U+200B between *
and /
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow this is awesome, thank you!
ed42bf1
to
4006119
Compare
Fixes #1, Fixes #2